Repository navigation
fix(ipc-runtime): give iPads and desktop-mode iPhones the iOS wasm memory maximum - #25760
Merged
just-mitch merged 3 commits intoNov 5, 2026
Conversation
just-mitch
marked this pull request as ready for review
November 5, 2026 01:17
alexghr
approved these changes
Nov 5, 2026
| const { userAgent, maxTouchPoints } = navigator; | ||
| return ( | ||
| /iPad|iPhone/.test(userAgent) || | ||
| (/Macintosh/.test(userAgent) && maxTouchPoints > 1) |
Contributor
There was a problem hiding this comment.
This check will identify the new MacBooks with touchscreens as iPads. Just pointing out in case we needed the extra memory on MacBooks.
Collaborator
Author
There was a problem hiding this comment.
Hm yeah good point. We'll have to see when they're released if/how we need to tweak this.
Contributor
|
@just-mitch please, rebase to |
…S settings iPadOS Safari and an iPhone that requests the desktop website send a Mac user agent. The iOS check matched only "iPad" or "iPhone", so these devices got the 4 GiB wasm memory maximum and the 2**19 SRS, and proofs failed with "RangeError: Out of memory". - isIos, exported from @aztec-foundation/ipc-runtime/wasm, also matches a Mac user agent with navigator.maxTouchPoints > 1. The browser memory maximum and the bb.js default SRS size use it. - The thread that creates the async wasm backend resolves the memory maximum and sends it to the main worker, because a worker has no maxTouchPoints. ZKM-1779
…its tests The bb.js SRS size change goes to the layer above (ZKM-1782), so that each layer stays in the review budget. The memory tests keep the same cases in one table. ZKM-1779
…ds the memory maximum A worker's navigator has no maxTouchPoints, so in a worker an iPad reads as a Mac. ZKM-1779
just-mitch
force-pushed
the
mitch/zkm-1779-bbjs-gives-ipads-and-desktop-mode-iphones-the-desktop-memory
branch
from
November 5, 2026 16:53
3c6199a to
ecdb999
Compare
just-mitch
deleted the
mitch/zkm-1779-bbjs-gives-ipads-and-desktop-mode-iphones-the-desktop-memory
branch
November 5, 2026 17:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before this PR, an iPad and an iPhone with Request Desktop Website on got the desktop wasm memory maximum of 4 GiB, because they send a Mac user agent. On an iPad, the zk.money PXE failed with "RangeError: Out of memory".
After this PR, these devices get the iOS maximum of 1 GiB (
2 ** 14pages) when the page creates the backend.The thread that creates the backend resolves the memory maximum
A worker has no
navigator.maxTouchPoints, so the main worker cannot detect these devices.WasmFfiBackend.createresolves the maximum and sends it in theinitmessage. A maximum that the caller sets still has priority. Evidence: the Pointer Events WebIDL declaresmaxTouchPointsonNavigatoronly.isIosin@aztec-foundation/ipc-runtime/wasmIt matches
iPadoriPhone, or aMacintoshuser agent withmaxTouchPoints > 1. It is not in the package root, which importsnode:netandnode:child_process.Other changes
WasmPlatform.maximumMemoryPagesdocuments the thread that reads it.Known issues
Ticket: ZKM-1779. Child PRs: #25761, #25763.